package com.breeze.components.message.delay;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 延迟任务配置
 *
 * @author breeze
 */
@Component
public class DelayQueueProperties {

  /** 最大重试次数 */
  @Getter private static int maxRetryTime = 10;

  @Value("${breeze.message.delay.maxRetryTime:10}")
  public void setMaxRetryTime(int maxRetryTime) {
    DelayQueueProperties.maxRetryTime = maxRetryTime;
  }
}
